package jehc.cloud.iot.live.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import jehc.cloud.common.annotation.NeedLoginUnAuth;
import jehc.cloud.common.base.BaseResult;
import jehc.cloud.iot.live.model.CameraEntity;
import jehc.cloud.iot.live.unvif.entity.UnVifInfo;
import jehc.cloud.iot.live.unvif.util.UnVifUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
 * @Desc 云控API
 * @Author 邓纯杰
 * @CreateTime 2012-12-12 12:12:12
 */
@RestController
@RequestMapping("/ptz")
@Api(value = "云控API",tags = "云控API",description = "云控API")
public class PtzController {


    @Autowired
    UnVifUtil unVifUtil;


    /**
     * 云控
     * @param unVifInfo
     * @return
     */
    @PostMapping("/control")
    @NeedLoginUnAuth
    @ApiOperation(value="云控",notes = "开始控制")
    public BaseResult<String> live(@RequestBody UnVifInfo unVifInfo){
        BaseResult baseResult = unVifUtil.control(unVifInfo);
        return baseResult;
    }
}
